package model;

public class Treasure {

    private Goods goods;

    private int num;

    public Treasure(Goods goods, int num) {
        this.goods = goods;
        this.num = num;
    }

    public Goods getGoods() {
        return goods;
    }

    public int getNum() {
        return num;
    }
    public double getSum() {
        return goods.getPrice() * num;
    }

    @Override
    public String toString() {
        return goods.getGoodsName() + "\t" + goods.getPrice() + "\t" + num + "\t" + getSum();

    }
}
